package com.inji.spark.biz.pojo;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang.StringUtils;

/**
 * @author liukz
 *
 */
public enum ApiCodeEnum {
	BFANGCREDITQUERY("bfangCreditQuery", "com.inji.spark.biz.pojo.CreditReportData"),
	;
	private String code = "";
	private String codeName = "";

	ApiCodeEnum(String code) {
		this.code = code;
	}

	ApiCodeEnum(String code, String codeName) {
		this.code = code;
		this.codeName = codeName;
	}

	public String getCode() {
		return code;
	}

	public String getCodeName() {
		return codeName;
	}

	public static String getCodeName(String code) {
	    ApiCodeEnum[] urls = ApiCodeEnum.values();
		for (ApiCodeEnum s : urls) {
			if (s.getCode().equals(code)) {
				return s.getCodeName();
			}
		}
		return StringUtils.EMPTY;
	}
	public static List<String> getEnumList(){
	    ApiCodeEnum[] apiCodes = ApiCodeEnum.values();
		List<String> apiCodeList = new ArrayList<String>(0);
		for (ApiCodeEnum s : apiCodes) {
		    apiCodeList.add(s.getCodeName());
		}
	    return apiCodeList;
	}
	

}
